package core;

import java.io.Serializable;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;


/**
 * Atomicka trida reprezentujici clanek
 * @author vojta
 */
@ManagedBean(name="Clanek")
@SessionScoped
public class Clanek implements Serializable {

    private String text; //text clanku
    private String nazev; //nazev clanku
    private List<String> obrazky; //seznam obrazku clanku, zobrazi se pod clankem
    private int kategorie; //kategorie clanku
    private int navstevnost; //kolik lidi shledlo tento clanek
    private int id;
    private int delka;
    private int libi, nelibi;

    public int getLibi() {
        return libi;
    }

    public void setLibi(int libi) {
        this.libi = libi;
    }

    public int getNelibi() {
        return nelibi;
    }

    public void setNelibi(int nelibi) {
        this.nelibi = nelibi;
    }        

    public int getDelka() {       
        return delka;
    }

    public void setDelka(int length) {
        this.delka = length;
    }
    
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
        
    
    public String getNazev() {
        return nazev;
    }

    public void setNazev(String nazev) {
        this.nazev = nazev;
    }

    public int getKategorie() {
        return kategorie;
    }

    public void setKategorie(int kategorie) {
        this.kategorie = kategorie;
    }

    public int getNavstevnost() {
        return navstevnost;
    }

    public void setNavstevnost(int navstevnost) {
        this.navstevnost = navstevnost;
    }

    public List<String> getObrazky() {
        return obrazky;
    }

    public void setObrazky(List<String> obrazky) {
        this.obrazky = obrazky;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
        this.delka = text.length();
    }
    
    public Clanek() {}
    
}
